﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterpagecuatui.Master" AutoEventWireup="true" CodeBehind="NewsReading.aspx.cs" Inherits="SQT.tracnghiem.BaiViet.ReadingNews" %>

<%@ Import Namespace="DataAccess" %>
<%@ Register Src="~/BaiViet/Left_searchmenupage.ascx" TagPrefix="uc1" TagName="Left_searchmenupage" %>
<%@ Register Src="~/BaiViet/Right_hotestpost.ascx" TagPrefix="uc1" TagName="Right_hotestpost" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../Scripts/jssor.slider-21.1.5.mini.js"></script>
    <title><%=this.title %> - Tiếng nhật thật dễ</title>
    <meta name="description" content="<%=this.description %>"/>
    <meta name="keywords" content="học tiếng nhật tại nha trang, học tiếng nhật, du học, du học tại nha trang, sen quốc tế"/>
    <meta name="author" content="tiengnhatthatde.com"/>
    <meta property="og:title" content="<%=this.title %>"/>
    <meta property="og:site_name" content="tiengnhatthatde.com"/>
    <meta property="og:url" content="tiengnhatthatde.com/bai-viet/<%=convertToUrl(convertToUnSign(this.title)) %>-<%=this.id %>"/>
    <meta property="og:image" content="tiengnhatthatde.com/Content/newsdata/avatar/<%=this.image_url %>"/>
    <meta property="og:description" content="<%=this.description %>"/>
    <meta property="og:type" content="article"/>
    <meta property="article:author" content="https://www.facebook.com/senquocte"/>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%var get_news = new TblNewsController().FetchAll().Where(x => x.NewsId == this.id).Single();
      var get_name_cate = new TblNewsCategoryController().FetchAll().Where(x => x.CatId == get_news.NewsCategory).Single();
      var get_poster = new TblManagerController().FetchAll().Where(x => x.ManagerId == get_news.NewsPoster).Single();
      string time = DateTime.Parse(get_news.NewsDate.ToString()).Day.ToString() + "/" + DateTime.Parse(get_news.NewsDate.ToString()).Month.ToString() + "/" + DateTime.Parse(get_news.NewsDate.ToString()).Year.ToString();
    %>
    <div class="page-main-content w3-row">
        <div class="news-page w3-padding">
            <div id="news-menu" class="w3-col l2">
                <uc1:Left_searchmenupage runat="server" ID="Left_searchmenupage" />
            </div>
            <div class="w3-col l7 w3-padding-left">
                <div class="w3-row w3-margin-bottom">
                    <header class="news-cate-header w3-border-teal"><a class="w3-btn w3-teal"><%=get_name_cate.CatName.ToUpper() %></a></header>
                    <div class="news-reading-tittle w3-xlarge"><%=get_news.NewsTitle %></div>
                    <div class="news-reading-detail"><span class="news-poster"><i class="fa fa-user w3-text-teal"></i>&nbsp;<%=get_poster.FullName %> - Theo <%=get_news.NewsSource %></span> | <span class="w3-text-grey"><%=time %></span><span> - </span><span class="w3-text-teal"><%=get_news.NewsViewed %> lượt xem</span></div>
                    <div class="news-reading-preview"><%=get_news.NewsReview %></div>
                    <div class="news-reading-content">
                        <%=get_news.NewsContent %>
                        <div class="w3-row w3-right-align w3-padding">
                            <label>Nguồn: <%=get_news.NewsSource %></label>
                        </div>
                    </div>
                    <div class="news-reading-like-share w3-row">
                        <div class="w3-tag w3-round w3-teal" style="padding: 3px; float: left">
                            <div class="w3-xlarge w3-tag w3-round w3-teal w3-border w3-border-white">
                                Bạn thích bài viết này ?
                            </div>
                        </div>
                        <div class="w3-text-teal w3-xlarge w3-col l1 w3-padding-left"><i class="fa fa-arrow-right"></i></div>
                        <iframe src="https://www.facebook.com/plugins/like.php?href=http://www.tiengnhatthatde.com/bai-viet/bai-viet-<%=this.id %>?fref%3Dts&width=450&layout=standard&action=like&size=large&show_faces=false&share=false&height=35&appId" width="300" height="35" style="border: none; overflow: hidden; float: left" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
                        <iframe src="https://www.facebook.com/plugins/share_button.php?href=http://www.tiengnhatthatde.com/bai-viet/bai-viet-<%=this.id %>&layout=button_count&size=small&mobile_iframe=true&appId=1054655387960274&width=110&height=20" width="110" height="20" style="border: none; overflow: hidden" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
                    </div>
                    <div class="news-reading-tag w3-row w3-border-teal">
                        <span class="w3-large">Từ khóa:&nbsp;</span><%for(int i=0;i<count_tags;i++){ var get_tags = new TblNewsTagController().FetchAll().Where(x=>x.TagId==int.Parse(tags[i])).Single(); %><a href="../tags/<%=get_tags.TagUrl %>-<%=get_tags.TagId %>?page=1" rel="tag"><span class="w3-tag w3-teal"><%=get_tags.TagName %></span></a>&nbsp;<%} %>
                    </div>
                </div>
            </div>
            <%
                
            %>
            <div class="w3-quarter w3-padding-left">
                <div id="news-newest" class="w3-row">
                    <header class="news-header w3-teal"><i class="fa fa-bookmark"></i>&nbsp;BÀI VIẾT LIÊN QUAN</header>
                    <div class="w3-row w3-white w3-text-dark-grey">
                        <div id="news-newest-test" class="news-slide-up-box">
                            <div data-u="slides" class="news-slide-up-content">
                                <div style="display: none;">
                                    <ul class="news-newest-list">
                                        <%for (int i = 0; i < 3;i++ ){ 
                                              if(this.relate[i]!=0)
                                              {
                                                  var get_relate_news = new TblNewsController().FetchAll().Where(x => x.NewsId == this.relate[i]).Single();
                                                  string relate_time = DateTime.Parse(get_relate_news.NewsDate.ToString()).Day + "/" + DateTime.Parse(get_relate_news.NewsDate.ToString()).Month + "/" + DateTime.Parse(get_relate_news.NewsDate.ToString()).Year;
                                        %>
                                        <li>
                                            <div class="news-newest-list-item">
                                                <div class="news-hot-title"><a href="../bai-viet/<%=convertToUrl(convertToUnSign(get_relate_news.NewsTitle)) %>-<%=get_relate_news.NewsId %>" class="w3-hover-text-teal"><%=limitTitle(get_relate_news.NewsTitle)%></a></div>
                                                <div class="w3-small"><span class="w3-text-grey"><%=relate_time %></span><span> - </span><span class="w3-text-teal"><%=get_relate_news.NewsViewed %> lượt xem</span></div>
                                            </div>
                                        </li>
                                        <%}} %>
                                    </ul>
                                </div>
                                <div style="display: none;">
                                    <ul class="news-newest-list">

                                        <%for (int i = 3; i < 6;i++ ){ 
                                              if(this.relate[i]!=0)
                                              {
                                                  var get_relate_news = new TblNewsController().FetchAll().Where(x => x.NewsId == this.relate[i]).Single();
                                                  string relate_time = DateTime.Parse(get_relate_news.NewsDate.ToString()).Day + "/" + DateTime.Parse(get_relate_news.NewsDate.ToString()).Month + "/" + DateTime.Parse(get_relate_news.NewsDate.ToString()).Year;
                                        %>
                                        <li>
                                            <div class="news-newest-list-item">
                                                <div class="news-hot-title"><a href="../bai-viet/<%=convertToUrl(convertToUnSign(get_relate_news.NewsTitle)) %>-<%=get_relate_news.NewsId %>" class="w3-hover-text-teal"><%=limitTitle(get_relate_news.NewsTitle)%></a></div>
                                                <div class="w3-small"><span class="w3-text-grey"><%=relate_time %></span><span> - </span><span class="w3-text-teal"><%=get_relate_news.NewsViewed %> lượt xem</span></div>
                                            </div>
                                        </li>
                                        <%}} %>

                                    </ul>
                                </div>
                                <div style="display: none;">
                                    <ul class="news-newest-list">
                                        <%for (int i = 6; i < 9;i++ ){ 
                                              if(this.relate[i]!=0)
                                              {
                                                  var get_relate_news = new TblNewsController().FetchAll().Where(x => x.NewsId == this.relate[i]).Single();
                                                  string relate_time = DateTime.Parse(get_relate_news.NewsDate.ToString()).Day + "/" + DateTime.Parse(get_relate_news.NewsDate.ToString()).Month + "/" + DateTime.Parse(get_relate_news.NewsDate.ToString()).Year;
                                        %>
                                        <li>
                                            <div class="news-newest-list-item">
                                                <div class="news-hot-title"><a href="../bai-viet/<%=convertToUrl(convertToUnSign(get_relate_news.NewsTitle)) %>-<%=get_relate_news.NewsId %>" class="w3-hover-text-teal"><%=limitTitle(get_relate_news.NewsTitle)%></a></div>
                                                <div class="w3-small"><span class="w3-text-grey"><%=relate_time %></span><span> - </span><span class="w3-text-teal"><%=get_relate_news.NewsViewed %> lượt xem</span></div>
                                            </div>
                                        </li>
                                        <%}} %>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <uc1:Right_hotestpost runat="server" ID="Right_hotestpost" />
            </div>
        </div>
    </div>
    <script src="../Scripts/javacuatui5.js"></script>
    <script src="../Scripts/slideup_news.js"></script>
</asp:Content>
